import { prop_cur_req_user_identity } from '../../../../../../../../Classes/cla_req_cur_headers_info';
import { get_mdb_cur_user_functions_active } from '../../../create/Func/Sign_identity/Func/get_mdb_path_cur_user_functions';
import { req_info_cur_user_function_update } from '../../Classes/cla_req_info_cur_user_function_update';
import { mdb_update_cur_user_function_update } from './Classes/cla_mdb_update_cur_user_function_update';

export function update_identity_cur_user_function_update(
  cur_req_info: req_info_cur_user_function_update
) {
  let mdb_identity_active = get_mdb_cur_user_functions_active(
    cur_req_info[prop_cur_req_user_identity]
  );

  let new_update_info = new mdb_update_cur_user_function_update(cur_req_info);

  mdb_identity_active.updateOne({ id: cur_req_info.id }, new_update_info);
}
